package com.xnx3.banmahuishou.core.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.xnx3.j2ee.entity.BaseEntity;

/**
 * 金额变更记录表
 * @author 王晓龙
 */
@Entity()
@Table(name = "laji_money_change_record")
public class MoneyChangeRecord extends BaseEntity implements java.io.Serializable {
	private Integer id;	//自增id
	private Integer userId;	//用户ID,关联user.id
	private String username;	//用户名称,关联user.nickname
	private String phone;	//用户手机号
	private Integer money;	//变更的金额,如果是提现的话,就是负数,例如:-33,单位:分
	private Integer createTime;	//创建时间,十位数时间戳
	private String remark;	//记录备注,例如,充值成功,提现成功
	
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "user_id", columnDefinition="int(11) COMMENT '用户ID,关联user.id' default '0'")
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	@Column(name = "username", columnDefinition="char(11) COLLATE utf8mb4_unicode_ci COMMENT '用户名称,关联user.nickname' default ''")
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	@Column(name = "phone", columnDefinition="char(11) COMMENT '用户手机号' default '0'")
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	@Column(name = "money", columnDefinition="int(11) COMMENT '变更的金额,如果是提现的话,就是负数,例如:-33,单位:分' default '0'")
	public Integer getMoney() {
		return money;
	}
	public void setMoney(Integer money) {
		this.money = money;
	}
	@Column(name = "create_time", columnDefinition="int(11) COMMENT '创建时间,十位数时间戳' default '0'")
	public Integer getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Integer createTime) {
		this.createTime = createTime;
	}
	@Column(name = "remark", columnDefinition="char(255) COLLATE utf8mb4_unicode_ci COMMENT '记录备注,例如,充值成功,提现成功' default ''")
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	@Override
	public String toString() {
		return "MoneyChangeRecord [id=" + id + ", userId=" + userId + ", username=" + username + ", phone=" + phone
				+ ", money=" + money + ", createTime=" + createTime + ", remark=" + remark + "]";
	}
	
}
